package com.fwc.fw.service;

import com.fwc.fw.domo.AbstractPersistableDomo;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.google.appengine.api.datastore.Key;

public interface DataStoreService {

    public List<AbstractPersistableDomo> findAll(Class clazz);
    public List<AbstractPersistableDomo> findAll(Class clazz, boolean ignoreDefaultFilter);
    public List<AbstractPersistableDomo> findAll(Class clazz, String order);
    public List<AbstractPersistableDomo> findAll(Class clazz, boolean ignoreDefaultFilter, String order);
    public Collection<AbstractPersistableDomo> search(Class clazz, String query);
	public Collection<AbstractPersistableDomo> search(Class clazz, String q, boolean orFields);
    public AbstractPersistableDomo save(AbstractPersistableDomo o);
    public void remove(AbstractPersistableDomo domo);
    public AbstractPersistableDomo find(Class clazz, Long id) throws Exception;
    public AbstractPersistableDomo find(Class clazz, String id) throws Exception;
    public AbstractPersistableDomo find(Class clazz, Key id) throws Exception;
    public AbstractPersistableDomo findByEmail(Class clazz, String email);
    public AbstractPersistableDomo findUnownedRelatives(AbstractPersistableDomo domo) throws Exception;
	public List<AbstractPersistableDomo> findAllWithUnowned(Class clazz);
	public List<AbstractPersistableDomo> findAllWithUnowned(Class clazz, String order);

}
